package net.runman.controller;

import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

@Controller
public class AdminController {

	/**
	 * 管理后台首页
	 * @param model
	 * @return index.jsp
	 */
	@RequestMapping(value = "admin", method = RequestMethod.GET)
	public String index(Model model) {
		return "admin/index";
	}

	/**
	 * 管理后台页面
	 * @return
	 */
	@RequestMapping(value = "admin/{view}.html", method = RequestMethod.GET, headers = "X-Requested-With=XMLHttpRequest")
	public String html(@PathVariable String view) {
		return "admin/" + view;
	}
}
